@extends("d.layout.index")
@section("con")
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span><i class="icon-table"></i>热搜词汇浏览</span>
    </div>
    <div class="mws-panel-body no-padding">
        <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">
        <form method="get" action="/admin/hotkeywords/index">
        <div id="DataTables_Table_1_length" class="dataTables_length">
        <label>显示 
	        <select size="1" name="num" aria-controls="DataTables_Table_1">
		        <option value="10" @if(!isset($request['num']) || $request['num'] == 10)selected @endif>10</option>
		        <option value="20" @if(isset($request['num']) && $request['num'] == 20)selected @endif>20</option>
		        <option value="30" @if(isset($request['num']) && $request['num'] == 30)selected @endif>30</option>
		        <option value="50" @if(isset($request['num']) && $request['num'] == 50)selected @endif>50</option>
	        </select> 条
        </label>
        </div>
        <div class="dataTables_filter" id="DataTables_Table_1_filter">
        	<label>搜索: <input aria-controls="DataTables_Table_1" @if(isset($request['keywords'])) value='{{$request["keywords"]}}' @endif name="keywords" type="text"></label>
        	<input type="submit" class="btn btn-paimary" value="提交">
        </div>
        </form>
        <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
            <thead>
                <tr role="row">
                	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 160px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
                	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 208px;" aria-label="Browser: activate to sort column ascending">词汇名</th>
                	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 195px;" aria-label="Platform(s): activate to sort column ascending">搜索量</th>
                	<th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" style="width: 135px;" aria-label="Engine version: activate to sort column ascending">操作</th>
                </tr>
            </thead>
            
        	<tbody role="alert" aria-live="polite" aria-relevant="all">
        		@foreach($list as $k=>$v)
        		@if($k % 2 == 0)
                    <tr class="even">
                @else
                    <tr class="odd">
                @endif  
                    <td class="  sorting_1">{{$v['id']}}</td>
                    <td class=" ">{{$v['name']}}</td>
                    <td class=" ">{{$v['num']}}</td>
                     <td class=" ">
                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                       	@if($v['status']==1)
                    	<a href="/admin/hotkeywords/status/{{$v['status']}}/{{$v['id']}}" class="icon-key-2" style="color:black;font-size:15px"></a>
                    	@else
                    	<a href="/admin/hotkeywords/status/{{$v['status']}}/{{$v['id']}}" class="icon-lock" style="color:black;font-size:15px"></a>
                   		 @endif
                    	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    	<a href="/admin/hotkeywords/delete/{{$v['id']}}" class="icon-trash" style="color:black;font-size:20px"></a>
                    </td>
                </tr>
                @endforeach
          	</tbody>
        </table>
        <div class="dataTables_paginate paging_full_numbers" id="page">
		    	{!!$list->appends($request)->render()!!}	
		</div>
    </div>
</div>
@endsection